package com.example.transaction.state;

import com.example.transaction.common.enums.StepStateEnum;
import com.example.transaction.entity.Step;

public interface IStepState {
    StepStateEnum getState();

    default void start(Step step) {
        throw new RuntimeException("不支持开始");
    }

    default void finish(Step step) {
        throw new RuntimeException("不支持点击完成");
    }
    default void skip(Step step) {
        throw new RuntimeException("不支持点击跳过");
    }
    default void fail(Step step) {
        throw new RuntimeException("不支持点击失败");
    }
    default void approve(Step step) {
        throw new RuntimeException("不支持复核");
    }
    default void rollback(Step step) {
        throw new RuntimeException("不支持点击收回");
    }
}
